<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>用户充值</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(
			function() {
			    $("#gold").focus();
				$("#inputForm").validate({
							rules : {
							//loginName: {remote: "${ctx}/sys/user/checkLoginName?oldLoginName=" + encodeURIComponent('${user.loginName}')}
							},
							messages : {
							//loginName: {remote: "用户登录名已存在"},
							//confirmNewPassword: {equalTo: "输入与上面相同的密码"}
							},
							submitHandler : function(form) {
								loading('正在提交，请稍等...');
								form.submit();
							},
							errorContainer : "#messageBox",
							errorPlacement : function(error, element) {
								$("#messageBox").text("输入有误，请先更正。");
								if (element.is(":checkbox")
										|| element.is(":radio")
										|| element.parent().is(
												".input-append")) {
									error.appendTo(element.parent()
											.parent());
								} else {
									error.insertAfter(element);
								}
							}
						});
			});
</script>
</head>
<body>
  <ul class="nav nav-tabs">
		<li><a href="${ctx}/sys/user/userAccountList">账户列表</a></li>
		<li class="active"><a href="${ctx}/sys/user/userAccountForm?id=${user.id}">账户修改</a></li>
	</ul>
	<br />
	<form:form id="inputForm" modelAttribute="user"
		action="${ctx}/sys/user/userAccountSave" method="post"
		class="form-horizontal">
		
		<sys:message content="${message}" />
		<div class="control-group">
			<label class="control-label">用户ID:</label>
			<div class="controls">
				<form:input path="id" readonly="true" htmlEscape="false" maxlength="50"
					class="required" />
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">姓名:</label>
			<div class="controls">
				<form:input path="name" htmlEscape="false" maxlength="50"
					class="required" />
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">播豆:</label>
			<div class="controls">
				<form:input path="gold" htmlEscape="false" maxlength="50"
					class="required digits" />
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		 <div class="control-group">
			<label class="control-label">金额（元）:</label>
			<div class="controls">
				<form:input path="account" htmlEscape="false" maxlength="50"
					class="required " />
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		 <div class="control-group">
			<label class="control-label">经验值:</label>
			<div class="controls">
				<form:input path="empiricalValue" htmlEscape="false" maxlength="50" class="digits" />
			</div>
		</div>
		 <div class="control-group">
			<label class="control-label">等级:</label>
			<div class="controls">
				<form:input path="level" htmlEscape="false" maxlength="50" class="digits" />
			</div>
		</div>
		
		<div class="form-actions">
			<shiro:hasPermission name="sys:user:edit">
				<input id="btnSubmit" class="btn btn-primary" type="submit"
					value="保 存" />&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回"
				onclick="history.go(-1)" />
		</div>
	</form:form>
</body>
</html>